#include <iostream>
#include <cstdio>
#include <string>
#include <vector>
using namespace std;

int main() {
    string s;
    getline(cin, s);

    vector<string> ans;
    string tmp;
    for (int i = 0; i < s.size(); ++i)
    {
        if (s[i] == '"')
        {
            ++i;
            while (s[i] != '"')
                tmp += s[i++];
            ans.push_back(tmp);
            tmp.clear();
        }
        if (s[i] != ' ' && s[i] != '"')
        {
            tmp += s[i];
        }
        if (s[i] == ' ' && !tmp.empty())
        {
            ans.push_back(tmp);
            tmp.clear();
        }
    }
    if (!tmp.empty())
        ans.push_back(tmp);
    cout << ans.size() << endl;
    for (auto& str : ans)
    {
        cout << str << endl;
    }
    return 0;
}